﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SudokuHelper.Model.Values;

namespace SudokuHelper.Model {
    public class Recalculator : IValueVisitor {
        #region Private members

        private readonly byte unavailableValue;

        #endregion

        #region Constructor

        public Recalculator(byte value) {
            this.unavailableValue = value;
        }

        #endregion

        #region Implementation of IValueVisitor

        public object Visit(UserValue value, object arg) {
            return null;
        }

        public object Visit(CalculatedValue value, object arg) {
            return null;
        }

        public object Visit(ValueRange valueRange, object arg) {
            valueRange.AvailableValues.Remove(unavailableValue);
            return null;
        }

        #endregion
    }
}